# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=intelhex
pkgname=python-$_pkgname
pkgver=2.3.0
pkgrel=5
pkgdesc='Python library for Intel HEX files manipulations'
arch=('any')
url='https://github.com/python-intelhex/intelhex'
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('bf9a7e29641959e26d8ac2ae2702ed5f4f0003f45793b70cd4cd99454d25304b90749e91a73a794a8363e4bc948ba91f274fc9c448567090c581d91f043f4ee9')

prepare() {
  cd $_pkgname-$pkgver
}

build() {
  cd $_pkgname-$pkgver

  python setup.py build
}

check() {
  cd $_pkgname-$pkgver

  python setup.py test
}

package() {
  cd $_pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
